home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / util / cdity / OnGo.lha / OnGo / Install-OnGo < prev    next >
Encoding:
Text File  |  1996-08-28  |  8.2 KB  |  352 lines

  1. ; ===================================
  2. ;
  3. ; OnGo installer script
  4. ; $VER: OnGo-Install 2.5 (28.8.96)
  5. ;
  6. ; Copyright © 1996 Tak Tang
  7. ;
  8. ; ===================================
  9.  
  10. ; ==== English strings
  11.  
  12. (set #bad-kick-msg "OnGo requires AmigaOS 2.04 or above.")
  13.  
  14. (set #hello-msg
  15.    (cat "\n\nThank you for trying OnGo, a cool StartButton and Virtual"
  16.     " Screen manager for the Amiga.\n\nNothing will be deleted from"
  17.     " your system with this installation program.\n\nIf you don't"
  18.     " understand any part of the installation, click on the \"Help\" "
  19.     "gadget found throughout the installation for more information."
  20.     "\n\nCLICK TO PROCEED"))
  21.  
  22. (set #alltime-msg
  23.    (cat "\n\nDo you want OnGo to be run every "
  24.     "time you turn on your machine?"))
  25.  
  26. (set #alltime-help
  27.    (cat "\n\nSelecting YES will copy OnGo to your WBStartUp drawer, where"
  28.     " it will be started every time you boot your machine.  Selecting"
  29.     " NO will copy OnGo to your SYS:Tools/Commodities drawer."))
  30.  
  31. (set #choosetool-msg
  32.    (cat "Where shall I copy OnGo (the main program)?"))
  33.  
  34. (set #choosetool-help
  35.    (cat "\nIf you want OnGo to start automatically each time you reboot,"
  36.     " place OnGo in SYS:WBStartUp.\n\nOtherwise, select the directory"
  37.     " where you store all your commodities.\n\nThis is usually"
  38.     " SYS:Tools/Commodities."))
  39.  
  40. (set #chooseprefs-msg
  41.    (cat "Which Configuration should I install?"))
  42.  
  43. (set #chooseprefs-help
  44.    (cat "\nThe Magic setup contains a menu for all the programs contained"
  45.     " in the AmigaMagic pack.\n\nThe Win95 setup contains a Win95 like"
  46.     " menu with many programs from the AmigaMagic pack, and many"
  47.     " commercial, shareware and PD programs."))
  48.  
  49. (set #chooseicon-msg
  50.    (cat "Which set of icons should I install?"))
  51.  
  52. (set #chooseicon-help
  53.    (cat "\nIt doesnt make any difference, I'm not much of an artist.  If"
  54.     " you have some of your own (MWB, NI etc...) they would be "
  55.     "gratefully received."))
  56.  
  57. (set #chooselook-msg
  58.    (cat "Choose style of menu."))
  59.  
  60. (set #chooselook-help
  61.    (cat "\nThe default look is 3DLOOK, which draws menus as a raised bevel"
  62.     " box.\n\nNEWLOOK produces menus similar to the standard workbench "
  63.     "menus - black on white, or whatever you have set them to.\n\nXLOOK"
  64.     " is like 3DLOOK, but recesses the items when they are active.  "
  65.     "This requires more space."))
  66.  
  67. (set #choosepatch-msg
  68.    (cat "Select patch."))
  69.  
  70. (set #choosepatch-help
  71.    (cat "\n'Shortbench' prevents icons on the workbench backdrop from"
  72.     " being obscured by the OnGo bar.  It does not make sense"
  73.     " to use it if you do not use a backdrop workbench."
  74.     "\n\n'Drag' allows you to drag the OnGo bar vertically."
  75.     "\n\n'AutoHide' will cause the bar to shrink to two pixels high,"
  76.     " and appear when the mouse is near it."
  77.     "\n\nOnly one option may be active."))
  78.  
  79. (set #choosepos-msg
  80.    (cat "Have the OnGo window appear at the top or bottom of the screen?"))
  81.  
  82. (set #choosepos-help
  83.    (cat "\nThe OnGo can appear at the bottom of the screen, like Win95,"
  84.     " or you can choose to have it at the top of the screen, like a"
  85.     " toolbar in a word processor."))
  86.  
  87. (set #bad-wbstart-msg
  88.    (cat "\nOnGo requires WBStart.library, by Stefan Becker.  It is not "
  89.     "installed on your machine.  You can get this library from "
  90.     "aminet:util/libs."))
  91.  
  92. (set #bad-datatypes-msg
  93.    (cat "\nOnGo can make use of the DataTypes library to load graphics "
  94.     "in from disk.  As you do not have this library installed, "
  95.     "none of the graphics will appear, although OnGo will still "
  96.     "function normally."))
  97.  
  98. (set #exit-msg
  99.    (cat "You can run OnGo now - just double click on the icon, or reboot"
  100.     " your machine.\n\nEnjoy OnGo!"))
  101.  
  102. (set #tooldir "SYS:WBStartUp")
  103. (set #prefdir "SYS:Prefs")
  104. (set #prefsch 0)
  105. (set #iconch 0)
  106. (set #patchch 0)
  107. (set #lookch 0)
  108. (set #posch 1)
  109.  
  110.  
  111. ; ===== Check Kickstart Version
  112.  
  113.  
  114. (if (< (getversion "LIBS:version.library") (* 37 65536))
  115.     (abort #bad-kick-msg)
  116. )
  117.  
  118. (message #hello-msg)
  119.  
  120. (if (exists "SYS:Utilities/MultiView" (NOREQ))
  121.     (set #Guide "SYS:Utilities/MultiView")
  122.     (set #Guide "SYS:Utilities/AmigaGuide")
  123. )
  124.  
  125. (set @default-dest "RAM:")
  126.  
  127. ; ===== Check for libraries
  128.  
  129. (if (= 0 (exists "libs:wbstart.library" (noreq)) )
  130.     (abort #bad-wbstart-msg)
  131. )
  132.  
  133. (if (= 0 (exists "libs:DataTypes.Library" (noreq)) )
  134.     (message #bad-datatypes-msg)
  135. )
  136.  
  137. ; ===== Ask Questions
  138.  
  139. (if (= 1 @user-level)
  140.     (if (= 0 (askbool (prompt #alltime-msg) (help #alltime-help) ) )
  141.         (set #tooldir "SYS:Tools/Commodities")
  142.     )
  143. )
  144.  
  145. (if (= 2 @user-level)
  146.     (set #tooldir
  147.         (askdir (prompt #choosetool-msg)
  148.             (help #choosetool-help)
  149.             (default #tooldir)
  150.         )
  151.     )
  152. )
  153.  
  154. (set @default-dest #tooldir)
  155.  
  156. (if (< 0 @user-level)
  157.     (set #prefsch
  158.         (askchoice (prompt #chooseprefs-msg)
  159.             (help #chooseprefs-help)
  160.             (choices "Magic" "Win95")
  161.         )
  162.     )
  163. )
  164.  
  165. (select #prefsch
  166.     (set #prefsfile "OnGo.Config")
  167.     (set #prefsfile "OnGo.Config.Win95")
  168. )
  169.  
  170. (if (< 0 @user-level)
  171.     (set #iconch
  172.         (askchoice (prompt #chooseicon-msg)
  173.             (help #chooseicon-help)
  174.             (choices "IconPack" "Flip" "Squish" "Menu")
  175.         )
  176.     )
  177. )
  178.  
  179. (select #iconch
  180.     (set #iconfile "Icons/IconPack")
  181.     (set #iconfile "Icons/Flip")
  182.     (set #iconfile "Icons/Squish")
  183.     (set #iconfile "Icons/Menu")
  184. )
  185.  
  186. (if (< 1 @user-level)
  187.     (set #lookch
  188.         (askchoice (prompt #chooselook-msg)
  189.             (help #chooselook-help)
  190.             (choices "3DLook" "NewLook" "XLook")
  191.         )
  192.     )
  193. )
  194.  
  195. (select #lookch
  196.     (set #look "3DLOOK")
  197.     (set #look "NEWLOOK")
  198.     (set #look "XLOOK")
  199. )
  200.  
  201. (if (< 1 @user-level)
  202.     (set #patchch
  203.         (askchoice (prompt #choosepatch-msg)
  204.             (help #choosepatch-help)
  205.             (default 0)
  206.             (choices "None" "Shortbench" "Drag" "AutoHide")
  207.         )
  208.     )
  209. )
  210.  
  211. (if (< 1 @user-level)
  212.     (set #posch
  213.         (askchoice (prompt #choosepos-msg)
  214.             (help #choosepos-help)
  215.             (default 1)
  216.             (choices "Top" "Bottom")
  217.         )
  218.     )
  219. )
  220.  
  221.  
  222. ; ===== Install main program
  223.  
  224. (if (exists (tackon #tooldir "OnGo") (noreq))
  225.     (
  226.       (if (exists (tackon #tooldir "OnGo.old") (noreq))
  227.       (delete (tackon #tooldir "OnGo.old") (infos))
  228.       )
  229.       (rename (tackon #tooldir "OnGo")
  230.           (tackon #tooldir "OnGo.old")
  231.       )
  232.     )
  233. )
  234.  
  235. (copyfiles
  236.     (prompt "Copying OnGo")
  237.     (help @copyfiles-help)
  238.     (source "OnGo")
  239.     (dest #tooldir)
  240.     (confirm)
  241. )
  242.  
  243. (copyfiles
  244.     (prompt "Copying OnGo.info")
  245.     (help @copyfiles-help)
  246.     (source (cat #iconfile ".info") )
  247.     (newname "OnGo.info")
  248.     (dest #tooldir)
  249. )
  250.  
  251. (tooltype
  252.     (dest (tackon #tooldir "OnGo"))
  253.     (settooltype "MENUDELAY" "5")
  254.     (settooltype "MENULAP" "75")
  255.     (settooltype "MINWIDTH" "0")
  256.     (settooltype "LOOK" #look)
  257.     (settooltype "ICONKEY" "RCOMMAND \\")
  258.     (settooltype "SCREENKEY3" "LALT F3")
  259.     (settooltype "SCREENTEXT3" "Screen 3")
  260.     (settooltype "SCREENKEY2" "LALT F2")
  261.     (settooltype "SCREENTEXT2" "Screen 2")
  262.     (settooltype "SCREENKEY1" "LALT F1")
  263.     (settooltype "SCREENTEXT1" "Screen 1")
  264.     (settooltype "NUMVSCREENS" "3")
  265.     (settooltype "GADGETTEXT" " OnGo ")
  266.     (settooltype "AUTOHIDE" (if (= #patchch 3) "TRUE" "FALSE"))
  267.     (settooltype "DRAG" (if (= #patchch 2) "TRUE" "FALSE"))
  268.     (settooltype "SHORTBENCH" (if (= #patchch 1) "TRUE" "FALSE"))
  269.     (settooltype "POSITION" (select #posch "TOP" "BOTTOM"))
  270.     (settooltype "PREFSPRG" "SYS:Prefs/OnGo.Prefs")
  271.     (settooltype "TOOLSARC" "ENVARC:OnGo.Config")
  272.     (settooltype "TOOLSFILE" "ENV:OnGo.Config")
  273.     (settooltype "CX_SHOW" "YES")
  274.     (settooltype "CX_PRIORITY" "0")
  275.     (settooltype "CX_HOTKEY" "CTRL LALT o")
  276.     (settooltype "TOOLPRI" "1")
  277.     (settooltype "DONOTWAIT" "")
  278. )
  279.  
  280.  
  281. ; ===== Install prefs program
  282.  
  283. (copyfiles
  284.     (prompt "Copying OnGo-Prefs")
  285.     (help @copyfiles-help)
  286.     (source "OnGo-Prefs")
  287.     (dest #prefdir)
  288.     (confirm)
  289. )
  290.  
  291. (copyfiles
  292.     (prompt "Copying OnGo-Prefs.info")
  293.     (help @copyfiles-help)
  294.     (source (cat #iconfile "-Prefs.info") )
  295.     (newname "OnGo-Prefs.info")
  296.     (dest #prefdir)
  297. )
  298.  
  299. (tooltype
  300.     (dest (tackon #prefdir "OnGo-Prefs") )
  301.     (setdefaulttool #Guide)
  302. )
  303.  
  304. ; ===== Install config files
  305.  
  306. (if (exists "ENVARC:OnGo.Config" (noreq))
  307.     (
  308.       (if (exists "ENVARC:OnGo.Config.old" (noreq))
  309.       (delete "ENVARC:OnGo.Config.old")
  310.       )
  311.       (rename "ENVARC:OnGo.Config"
  312.           "ENVARC:OnGo.Config.old"
  313.       )
  314.     )
  315. )
  316.  
  317. (copyfiles
  318.     (prompt "Copying OnGo.Config")
  319.     (help @copyfiles-help)
  320.     (source #prefsfile)
  321.     (dest "ENVARC:")
  322.     (newname "OnGo.Config")
  323.     (confirm)
  324. )
  325.  
  326. (copyfiles
  327.     (prompt "Copying OnGo.Config")
  328.     (help @copyfiles-help)
  329.     (source #prefsfile)
  330.     (dest "ENV:")
  331.     (newname "OnGo.Config")
  332.     (infos)
  333. )
  334.  
  335. ; ===== Install icons
  336.  
  337. (copyfiles
  338.     (prompt "Copying OnGo Icons")
  339.     (help @copyfiles-help)
  340.     (source "OnGoIcons")
  341.     (dest "S:OnGoIcons")
  342.     (all)
  343.     (confirm)
  344. )
  345.  
  346. ; ==== Exit
  347.  
  348. (exit #exit-msg)
  349.  
  350. ; ==== End of installer script
  351.  
  352.